package com.woniuxy.entity.house;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * <p>
 * 
 * </p>
 *
 * @author liangyu
 * @since 2021-03-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class Building implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private String buildingName;

    private BigDecimal avgPrice;

    private String buildingFeatures;

    private String salesOffices;

    private String buildingAddress;

    private String buildingType;

    private String developers;

    private Double floorSpace;

    private Double constructionArea;

    private Integer houseNum;

    private Integer periodInt;

    private Double greeningRate;

    private BigDecimal plotRate;
    @JsonDeserialize(using = LocalDateDeserializer.class)
    @JsonSerialize(using = LocalDateSerializer.class)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate getTime;

    private String propertyType;

    private String propertyName;

    //物业价格，例如：范围值1-2元
    private String propertyPrice;

    private String waterType;

    private String powerType;

    private String heatingMethod;

    private Integer parkNum;

    private String parkProportion;

    private String surroundingFacility;

    private String image;

    private Integer count_rent;

    private Integer count_sale;

    //经度
    private BigDecimal longitude;
    //纬度
    private BigDecimal latitude;

    private Integer status;


}
